package com.btt.pattern.singleton.lazy;

/**
 * @description  方法同步实现线程安全懒汉式
 *
 * @author btt
 * @create 2018/6/27
 * @since 1.0.0
 */
public class LazyTwo {

    private LazyTwo(){}

    private static LazyTwo LAZYTWO = null;

    public static final synchronized LazyTwo getInstance(){
        if(LAZYTWO == null){
            LAZYTWO = new LazyTwo();
        }
        return LAZYTWO;
    }

}
